

import java.util.*; // Required for using scanner class

class rec_fact // same as file name
{
	public static void main (String[] args)  // Main Method
	{
		// Declared kbd as object of scanner class
		Scanner kbd = new Scanner(System.in);
	 	 
		System.out.println("Please Enter the number: ");
	
		int n = kbd.nextInt();// Get the input from the user
	
		long fact = getFact(n); // call the function
	
		System.out.println("The Factorial of "+n+" is : "+fact); // Display the output
	}

	static long getFact(int n)
	{
		if(n==0) // Factorial of zero is 1
			return 1;
		else
			return n * getFact(n-1); // factorial on any number n is n * (n-1)
	}								 // Here function getFact is called recursively to get 
								 // the factorial of n.


} // End of class rec_fact